package com.gwtgeo.ui.shared.event;

import com.google.gwt.event.shared.GwtEvent;
import com.gwtgeo.ui.client.mvp.windowsmanager.WindowTypeEnum;

public class ShowViewEvent extends GwtEvent<ShowViewEventHandler>{

	public static Type<ShowViewEventHandler> TYPE = new Type<ShowViewEventHandler>();
	
	private WindowTypeEnum type;
	
	public ShowViewEvent() {
		super();
	}
	
	public ShowViewEvent(WindowTypeEnum type) {
		super();
		this.type = type;
	}

	@Override
	protected void dispatch(ShowViewEventHandler handler) {
		handler.onShowView(this);
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<ShowViewEventHandler> getAssociatedType() {
		return TYPE;
	}

	public static Type<ShowViewEventHandler> getTYPE() {
		return TYPE;
	}

	public WindowTypeEnum getType() {
		return type;
	}
}
